﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admincp/MasterPageEmpty.master" AutoEventWireup="true" CodeFile="lophoc.aspx.cs" Inherits="admincp_lophoc" %>

<%@ Register src="wucNavTop.ascx" tagname="wucNavTop" tagprefix="uc1" %>
<%@ Register src="wucSideBar.ascx" tagname="wucSideBar" tagprefix="uc2" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cphHead" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphTopBar" Runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cphSideBar" Runat="Server">
    <uc2:wucSideBar ID="wucSideBar1" runat="server" />
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="cphNavTop" Runat="Server">
    <uc1:wucNavTop ID="wucNavTop1" runat="server" />
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="cphContent" Runat="Server">
    <div class="flat_area grid_16">
        <h2>
            Danh mục lớp học</h2>
    </div>
    <div class="flat_area grid_16">
        <div class="block">
            <button id="btnThemMoiLopHoc" onserverclick="ThemMoiLopHoc" runat="server" class="button_colour round_all">
                <img height="24" width="24" alt="Thêm lớp học" src="images/icon_add.png"><span>Thêm lớp học</span></button>
        </div>
    </div>
    <div class="box grid_16 round_all">
        <asp:ListView ID="lvLopHoc" runat="server" onitemcommand="lvLopHoc_ItemCommand" 
            onitemdeleting="lvLopHoc_ItemDeleting" onitemediting="lvLopHoc_ItemEditing">
            <LayoutTemplate>
                <table class="display table">
                    <thead>
                        <tr>
                            <th style="width: 5%">
                                Mã lớp học
                            </th>
                            <th style="width: 60%">
                                Tên lớp học
                            </th>
                            <th style="width: 6%">
                                Khối lớp
                            </th>
                            <th style="width: 6%">
                                Năm học
                            </th>
                            <th style="width: 5%" align="center">
                                Trạng thái
                            </th>
                            <th style="width: 5%" align="center">
                                Sửa / Xóa
                            </th>
                        </tr>
                    </thead>
                    <tbody>
                        <asp:PlaceHolder ID="itemPlaceHolder" runat="server"></asp:PlaceHolder>
                    </tbody>
                </table>
            </LayoutTemplate>
            <ItemTemplate>
                <tr>
                    <td valign="middle">
                        <b>
                            <%# Eval("MaLopHoc")%></b>
                    </td>
                    <td>
                        <b>
                            <%# Eval("TenLopHoc")%></b>
                    </td>
                    <td align="center">
                        <%# Eval("TenKhoiLop")%>
                    </td>
                    <td align="center">
                        <%# Eval("TenNamHoc") %>
                    </td>
                    <td align="center">
                        <asp:Image ID="imgStatus" ImageUrl='<%# HienThiTrangThaiBangHinhAnh(Eval("TrangThai")) %>' runat="server" Width="10"
                            Height="10" />
                    </td>
                    <td align="center">
                        <asp:ImageButton ID="btnSuaGiaoVien" runat="server" CssClass="help" ToolTip="Sửa lớp học"
                            ImageUrl="images/icon_edit.png" CommandName="EDIT" CommandArgument='<%# Eval("MaLopHoc") %>' />
                        <img alt="" src="images/icon_blank.png" />
                        <asp:ImageButton ID="btnXoaGiaoVien" runat="server" CssClass="help" ToolTip="Xóa lớp học"
                            ImageUrl="images/icon_delete.png" CommandName="DELETE" CommandArgument='<%# Eval("MaLopHoc") %>'
                            OnClientClick="return confirm('Bạn chắc chắn muốn xóa lớp học này?')" />
                    </td>
                </tr>
            </ItemTemplate>
        </asp:ListView>
    </div>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="cphTemplateOption" Runat="Server">
</asp:Content>

